
cc.Class({
    extends: cc.Component,

    properties: {
        launcher: require('SkillLauncher'),
        players: [cc.Node]
    },

    onLoad() {
        cc.log('Jinrudao');
        this.n_fireTime = 0
        this.n_playerId = global.planeId;
        // SoundMgr.playMusic('./Audio/bgm_main');
    },

    start() {
        this.launcher.setSkillParentNode(this.launcher.node, true);        
        for (var i in this.players) {
            this.players[i].active = this.n_playerId == i;
        }
        this.level = 4
        this.n_fireTime = 5;
        this.startFire();
    },

    startFire() {
        this.launcher.reset();
        var option = global.DataConfig.monster['player' + (this.n_playerId + 1)]
        this.launcher.addLauncher(option.status[4])
    },

    ani(id) {
        return this.players[id].getChildByName('change1').getComponent(cc.Animation)
    },

});
